Skip to content

[Discover] [Metrics] Re-introduce metrics suggested queries#251376

Merged
justinkambic merged 19 commits intoelastic:mainfrom
justinkambic:251289/select-all-metrics
Feb 20, 2026
Merged

[Discover] [Metrics] Re-introduce metrics suggested queries#251376
justinkambic merged 19 commits intoelastic:mainfrom
justinkambic:251289/select-all-metrics

Conversation

@justinkambic
Copy link
Copy Markdown
Contributor

@justinkambic justinkambic commented Feb 3, 2026

Summary

Resolves #251289.

Re-introduces the "all metrics" ES|QL recommendation that was previously removed. Update: per the ticket, we have changed the copy to read "Search all metrics". The screenshots are the same but the copy has been updated.

Demonstration of change

Recommends when clicking empty editor

20260202231249

Recommends when user types "metrics"

20260202231344

Includes the recommendation in ES|QL help menu

redacted

We are actually blocked on providing this functionality for the time being. See the discussion on #237425 for further information.

Testing the PR

Load some metrics data. You can do this using simian-forge. Pull the code, npm ci && npm run build, and you can index data with a command like:

./forge --backfill now-1h --interval 10s --count 100 --dataset hosts --purge --elasticsearch-url {ES_URL} --elasticsearch-api-key {CREATE_AN_API_KEY}

Navigate to Discover and test the UI.

- Introduced  to determine the solution ID for extensions, defaulting to 'oblt' for the 'discover' app.
- Updated the ESQL editor and menu popover components to use the new  variable for fetching recommended queries.
- Added new recommended queries for metrics in the observability plugin.

This change improves the handling of solution IDs across components, ensuring consistent behavior when fetching ESQL extensions.
@justinkambic justinkambic self-assigned this Feb 3, 2026
@justinkambic justinkambic added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.3.0 Team:obs-exploration Observability Exploration team v9.4.0 labels Feb 3, 2026
@miguel-sanchez-elastic
Copy link
Copy Markdown

Hi @justinkambic , it looks good to me, the only thing that I would ask is if changing the text could be an option (like in the Acceptance criteria). If it can generate some confusion, let's leave it as is and it is all good but if we can change it that would be great.

- Changed the name and description of the All
…ry for metrics

- Removed the deprecated logic for determining the solution ID for extensions in the ESQL editor.
- Updated the ESQL editor to use the active solution ID directly.
- Introduced a new recommended query template for searching all metrics, enhancing the usability of the ESQL language features.
@justinkambic justinkambic changed the title [Discover] [Metrics] Refactor ESQL solution ID handling in ESQL editor and menu popover [Discover] [Metrics] Re-introduce metrics suggested queries Feb 3, 2026
@justinkambic justinkambic marked this pull request as ready for review February 5, 2026 19:56
@justinkambic justinkambic requested review from a team as code owners February 5, 2026 19:56
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-exploration-team (Team:obs-exploration)

Copy link
Copy Markdown
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the code from the recommended queries. They are not implemented to work like that

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #16 / "before all" hook in "{root}"
  • [job] [logs] FTR Configs #108 / Discover alerting Search source Alert should check that there are no errors detected after an alert is created
  • [job] [logs] FTR Configs #10 / Ingest pipelines app Ingest Pipelines Pipelines list Pipelines tree Displays the structure tree in the details flyout if the pipeline has Pipeline processors

Metrics [docs]

✅ unchanged

History

cc @justinkambic

'Counts error occurrences by host name and shows the top 50 hosts with the most errors',
}),
},
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TS command and the metrics experience is available in all solutions (oblt, security, search).

However, the recommended Search all metrics command is only available for observability solution view.

Could we please enable it for the other solutions as well to align with the previous setup?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check 684e1ab, it should behave the same in all three solution views now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kpatticha when you have a chance this is ready for review again, just verified CI is good

@justinkambic justinkambic merged commit d845e03 into elastic:main Feb 20, 2026
19 checks passed
@justinkambic justinkambic deleted the 251289/select-all-metrics branch February 20, 2026 16:35
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.3

https://github.com/elastic/kibana/actions/runs/22232360959

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 20, 2026
…251376)

## Summary

Resolves elastic#251289.

~Re-introduces the "all metrics" ES|QL recommendation that was
previously removed.~ Update: per the ticket, we have changed the copy to
read "Search all metrics". The screenshots are the same but the copy has
been
[updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74).

## Demonstration of change

### Recommends when clicking empty editor

![20260202231249](https://github.com/user-attachments/assets/e988f844-17f7-4752-bda7-bd1352390ab4)

### Recommends when user types "metrics"

![20260202231344](https://github.com/user-attachments/assets/4b62a22b-ba9e-4a9b-bbb0-aff1564003cd)

### ~Includes the recommendation in ES|QL help menu~

**redacted**

We are actually blocked on providing this functionality for the time
being. See the discussion on
elastic#237425 for further information.

## Testing the PR

Load some metrics data. You can do this using
[simian-forge](https://github.com/simianhacker/simian-forge). Pull the
code, `npm ci && npm run build`, and you can index data with a command
like:

```bash
./forge --backfill now-1h --interval 10s --count 100 --dataset hosts --purge --elasticsearch-url {ES_URL} --elasticsearch-api-key {CREATE_AN_API_KEY}
```

Navigate to Discover and test the UI.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d845e03)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 20, 2026
…51376) (#254261)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Discover] [Metrics] Re-introduce metrics suggested queries
(#251376)](#251376)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Justin
Kambic","email":"jk@elastic.co"},"sourceCommit":{"committedDate":"2026-02-20T16:35:01Z","message":"[Discover]
[Metrics] Re-introduce metrics suggested queries (#251376)\n\n##
Summary\n\nResolves #251289.\n\n~Re-introduces the \"all metrics\" ES|QL
recommendation that was\npreviously removed.~ Update: per the ticket, we
have changed the copy to\nread \"Search all metrics\". The screenshots
are the same but the copy
has\nbeen\n[updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74).\n\n##
Demonstration of change\n\n### Recommends when clicking empty
editor\n\n\n![20260202231249](https://github.com/user-attachments/assets/e988f844-17f7-4752-bda7-bd1352390ab4)\n\n###
Recommends when user types
\"metrics\"\n\n\n![20260202231344](https://github.com/user-attachments/assets/4b62a22b-ba9e-4a9b-bbb0-aff1564003cd)\n\n###
~Includes the recommendation in ES|QL help menu~\n\n**redacted**\n\nWe
are actually blocked on providing this functionality for the
time\nbeing. See the discussion
on\nhttps://github.com//issues/237425 for further
information.\n\n## Testing the PR\n\nLoad some metrics data. You can do
this
using\n[simian-forge](https://github.com/simianhacker/simian-forge).
Pull the\ncode, `npm ci && npm run build`, and you can index data with a
command\nlike:\n\n```bash\n./forge --backfill now-1h --interval 10s
--count 100 --dataset hosts --purge --elasticsearch-url {ES_URL}
--elasticsearch-api-key {CREATE_AN_API_KEY}\n```\n\nNavigate to Discover
and test the UI.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d845e0376b9827cd6f4e1e7ff1efffbc092eefe1","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","backport:version","Feature:Metrics
in
Discover","Team:obs-exploration","v9.4.0","Team:obs-ux-management","v9.3.1"],"title":"[Discover]
[Metrics] Re-introduce metrics suggested
queries","number":251376,"url":"https://github.com/elastic/kibana/pull/251376","mergeCommit":{"message":"[Discover]
[Metrics] Re-introduce metrics suggested queries (#251376)\n\n##
Summary\n\nResolves #251289.\n\n~Re-introduces the \"all metrics\" ES|QL
recommendation that was\npreviously removed.~ Update: per the ticket, we
have changed the copy to\nread \"Search all metrics\". The screenshots
are the same but the copy
has\nbeen\n[updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74).\n\n##
Demonstration of change\n\n### Recommends when clicking empty
editor\n\n\n![20260202231249](https://github.com/user-attachments/assets/e988f844-17f7-4752-bda7-bd1352390ab4)\n\n###
Recommends when user types
\"metrics\"\n\n\n![20260202231344](https://github.com/user-attachments/assets/4b62a22b-ba9e-4a9b-bbb0-aff1564003cd)\n\n###
~Includes the recommendation in ES|QL help menu~\n\n**redacted**\n\nWe
are actually blocked on providing this functionality for the
time\nbeing. See the discussion
on\nhttps://github.com//issues/237425 for further
information.\n\n## Testing the PR\n\nLoad some metrics data. You can do
this
using\n[simian-forge](https://github.com/simianhacker/simian-forge).
Pull the\ncode, `npm ci && npm run build`, and you can index data with a
command\nlike:\n\n```bash\n./forge --backfill now-1h --interval 10s
--count 100 --dataset hosts --purge --elasticsearch-url {ES_URL}
--elasticsearch-api-key {CREATE_AN_API_KEY}\n```\n\nNavigate to Discover
and test the UI.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d845e0376b9827cd6f4e1e7ff1efffbc092eefe1"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251376","number":251376,"mergeCommit":{"message":"[Discover]
[Metrics] Re-introduce metrics suggested queries (#251376)\n\n##
Summary\n\nResolves #251289.\n\n~Re-introduces the \"all metrics\" ES|QL
recommendation that was\npreviously removed.~ Update: per the ticket, we
have changed the copy to\nread \"Search all metrics\". The screenshots
are the same but the copy
has\nbeen\n[updated](https://github.com/elastic/kibana/pull/251376/changes#diff-c9b2af3b7c484565768216fd866cd80df9df1e3b1c919994c1bbbbb41be93a96R74).\n\n##
Demonstration of change\n\n### Recommends when clicking empty
editor\n\n\n![20260202231249](https://github.com/user-attachments/assets/e988f844-17f7-4752-bda7-bd1352390ab4)\n\n###
Recommends when user types
\"metrics\"\n\n\n![20260202231344](https://github.com/user-attachments/assets/4b62a22b-ba9e-4a9b-bbb0-aff1564003cd)\n\n###
~Includes the recommendation in ES|QL help menu~\n\n**redacted**\n\nWe
are actually blocked on providing this functionality for the
time\nbeing. See the discussion
on\nhttps://github.com//issues/237425 for further
information.\n\n## Testing the PR\n\nLoad some metrics data. You can do
this
using\n[simian-forge](https://github.com/simianhacker/simian-forge).
Pull the\ncode, `npm ci && npm run build`, and you can index data with a
command\nlike:\n\n```bash\n./forge --backfill now-1h --interval 10s
--count 100 --dataset hosts --purge --elasticsearch-url {ES_URL}
--elasticsearch-api-key {CREATE_AN_API_KEY}\n```\n\nNavigate to Discover
and test the UI.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d845e0376b9827cd6f4e1e7ff1efffbc092eefe1"}},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Justin Kambic <jk@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience Feature:Metrics in Discover release_note:skip Skip the PR/issue when compiling release notes Team:obs-exploration Observability Exploration team Team:obs-ux-management v9.3.1 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Metrics][Discover] Create a recommended query for "All metrics"

6 participants